#file=open(r'E:\woniu\test.txt',mode='r',encoding='utf8')
# file=open(file='../test.txt',mode='w+',encoding='utf8')
#
# print(file.read())
# print(file.write('jhgdwertyjhytght'))



# file=open(file='../test.txt',mode='r+',encoding='utf8')
#
# print(file.tell())
# print(file.write(''))
# print(file.read())
# file.seek()
# print(file.tell())


# file=open(file="../tigger.jpg" , mode="rb")
# tigger_read=file.read()
# print(tigger_read)#读出来
# f_wirte=open(file="../tigger.jpg" ,mode="wb")
# f_wirte.write(tigger_read)#写入一个新文件
# print(tigger_read)

# user=open(file="../userinfo",mode="r",encoding='utf8')
# read_user=user.readlines()
# print(read_user)
# user.close()
#
# for i in range(len(read_user)):
#     read_user[i]=read_user[i].split(',')
#     read_user[i][3]=int(read_user[i][3])
# print(read_user)


##2．修改文件中李四的金额为100，日志为:“2020-01-29 14:30:00存入100元"#
# read_user[1][3]=100
# read_user[1][4]="2020-01-29 14:30:00存入100元\n"
##写之前先看看数据是否正确，
# print(read_user)
##清空之前的数据，写入列表中的数据即可。)
# user_write=open(file="../userinfo",mode="w",encoding="utf8")
# for u in range(len(read_user)):
#     read_user[u][3] =str(read_user[u][3])
#     read_user[u]=",".join(read_user[u])
# print("user_write --》" ,read_user)
# user_write.writelines(read_user)
# user_write.close()








